package middleware

import (
	"github.com/gin-gonic/gin"
	"ollama-qwen/controller"
)

func Router(r *gin.Engine) gin.HandlerFunc {

	chat := controller.Chat{}
	r.Static("/assets", "assets")

	mainGroup := r.Group("/")

	return func(ctx *gin.Context) {
		mainGroup.POST("/chat", chat.DoChat)
		mainGroup.POST("/chat_stream", chat.DoChatStream)
	}
}
